var html = require("html-webpack-plugin");
var Ex = require('extract-text-webpack-plugin');
module.exports = {
	entry: __dirname+"/src/js/main.js",//入口要编译的文件
	output: {
		path:__dirname+"/dist",//输出
		filename:"test.js"
	},
	module:{
		rules:[{
			test:/\.css$/,
			use:[Ex.extract({
				fallback:'style-loader',
				use:'css-loader'
			})]
		}
		
		]
	},
	plugins:[
		new html({template:'./src/index.html'}),
		new Ex("[name].css")
	]
}
